home *** CD-ROM | disk | FTP | other *** search
/ AmigActive 10 / AACD 10.iso / AACD / System / AsyncioPPC / include / libraries / asyncio.h
C/C++ Source or Header  |  2000-05-10  |  1KB  |  63 lines

  1. #ifndef LIBRARIES_ASYNCIO_H
  2. #define LIBRARIES_ASYNCIO_H
  3. #ifndef EXEC_PORTS_H
  4. #include <exec/ports.h>
  5. #endif
  6. #ifndef DOS_DOS_H
  7. #include <dos/dos.h>
  8. #endif
  9. #ifndef DOS_DOSEXTENS_H
  10. #include <dos/dosextens.h>
  11. #endif
  12.  
  13. struct AsyncFile
  14. {
  15. BPTR af_File;
  16. ULONG af_BlockSize;
  17. struct MsgPort *af_Handler;
  18. UBYTE *af_Offset;
  19. LONG af_BytesLeft;
  20. ULONG af_BufferSize;
  21. UBYTE *af_Buffers[2];
  22. struct StandardPacket af_Packet;
  23. struct MsgPort af_PacketPort;
  24. ULONG af_CurrentBuf;
  25. ULONG af_SeekOffset;
  26. UBYTE af_PacketPending;
  27. UBYTE af_ReadMode;
  28. UBYTE af_CloseFH;
  29.  
  30. /*
  31. The following members were not listed in the V39 source code
  32. of asyncio.library, although they were used.
  33. I decided to add them at the end.
  34. Any, this structure is private and you should keep you hand off
  35. unless you dnot know how to use then !!!
  36. */
  37.  
  38. UBYTE af_SeekPastEOF; 
  39. LONG af_LastRes1;
  40. LONG af_LastBytesLeft;
  41. };
  42.  
  43. /*
  44. These enum werde typedef structures before. I turned them into ints.
  45. But this does not affect your code anyway (100% compatible ! to V39 !)
  46. */
  47.  
  48. enum /* OpenModes */
  49. {
  50. MODE_READ,
  51. MODE_WRITE,
  52. MODE_APPEND
  53. };
  54.  
  55. enum /* SeekModes */
  56. {
  57. MODE_START=-1,
  58. MODE_CURRENT,
  59. MODE_END
  60. };
  61.  
  62. #endif
  63.